import 'package:flutter_test/flutter_test.dart';
import 'package:map_flutter_sctx/map_flutter_sctx.dart';
import 'package:map_flutter_sctx/map_flutter_sctx_platform_interface.dart';
import 'package:map_flutter_sctx/map_flutter_sctx_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMapFlutterSctxPlatform
    with MockPlatformInterfaceMixin
    implements MapFlutterSctxPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final MapFlutterSctxPlatform initialPlatform = MapFlutterSctxPlatform.instance;

  test('$MethodChannelMapFlutterSctx is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelMapFlutterSctx>());
  });

  test('getPlatformVersion', () async {
    MapFlutterSctx mapFlutterSctxPlugin = MapFlutterSctx();
    MockMapFlutterSctxPlatform fakePlatform = MockMapFlutterSctxPlatform();
    MapFlutterSctxPlatform.instance = fakePlatform;

    expect(await mapFlutterSctxPlugin.getPlatformVersion(), '42');
  });
}
